﻿<%@ WebHandler Language="C#" Class="ToSetSep" %>

using System;
using System.Web;
using BLL;
public class ToSetSep : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        string Ano, Num, Logo, AddressType;
        Ano = context.Request.Params["Ano"].ToString().Trim();
        Num = context.Request.Params["Num"].ToString().Trim();
        Logo = context.Request.Params["Logo"].ToString().Trim();
        AddressType = context.Request.Params["AddressType"].ToString().Trim();


        if (new Tools().StringToIntDif(Num) < 1)
        {
            context.Response.Write("请输入至少1以上的分单数量");
            return;
        }
        string err = "";
        if (new SepBillService().SetSep(Ano, Num, Logo, AddressType, ref err))
        {
            err = "ok";
        }
     
        context.Response.Write(err);



    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}